package com.goods.business.mapper;

import com.goods.common.model.business.Product;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;
import tk.mybatis.mapper.common.Mapper;

import java.util.List;

@Repository
public interface ProductMapper extends Mapper<Product> {

    /**
     * 加载物资列表
     * @param name
     * @param categoryId
     * @param supplier
     * @param status
     * @return
     */
    List<Product> findProductList(@Param("name") String name, @Param("categoryId") Long categoryId, @Param("supplier") String supplier, @Param("status") Integer status);

    /**
     * 加载商品列表(可入库)
     * @param oneCategoryId
     * @param twoCategoryId
     * @param threeCategoryId
     * @return
     */
    List<Product> findProducts(@Param("oneCategoryId") Long oneCategoryId, @Param("twoCategoryId") Long twoCategoryId, @Param("threeCategoryId") Long threeCategoryId);
}
